package com.gk.carshopsys.pojo;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;

public class Part {
    //id
    @ExcelIgnore
    private Long id;
    //配件名字
    @ExcelProperty(value = "配件名称",index = 0)
    private String pname;
    //数量
    @ExcelProperty(value = "单位",index = 2)
    private Long quantity;
    //单位
    @ExcelProperty(value = "数量",index = 1)
    private String unit;
    //价格
    @ExcelProperty(value = "价格",index = 3)
    private Double price;
    //生产商家
    @ExcelProperty(value = "生产商家",index = 4)
    private String factory;
    //类型，进口或国产
    @ExcelProperty(value = "类型",index = 5)
    private String source;

    public Part() {
    }

    public Part(Long id, String pname, Long quantity, String unit, Double price, String factory, String source) {
        this.id = id;
        this.pname = pname;
        this.quantity = quantity;
        this.unit = unit;
        this.price = price;
        this.factory = factory;
        this.source = source;
    }

    public Part(String pname, Long quantity, String unit, Double price, String factory, String source) {
        this.pname = pname;
        this.quantity = quantity;
        this.unit = unit;
        this.price = price;
        this.factory = factory;
        this.source = source;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getPname() {
        return pname;
    }

    public void setPname(String pname) {
        this.pname = pname;
    }

    public Long getQuantity() {
        return quantity;
    }

    public void setQuantity(Long quantity) {
        this.quantity = quantity;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public String getFactory() {
        return factory;
    }

    public void setFactory(String factory) {
        this.factory = factory;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    @Override
    public String toString() {
        return "Part{" +
                "id=" + id +
                ", pname='" + pname + '\'' +
                ", quantity=" + quantity +
                ", unit='" + unit + '\'' +
                ", price=" + price +
                ", factory='" + factory + '\'' +
                ", source='" + source + '\'' +
                '}';
    }
}
